home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / WINER.ZIP / CHAP6-11.BAS < prev    next >
BASIC Source File  |  1992-05-13  |  388b  |  16 lines

  1. '*********** CHAP6-11.BAS
  2.  
  3. 'Copyright (c) 1992 Ethan Winer
  4.  
  5. Value# = 123.45678#
  6.  
  7. OPEN "\DEV\NUL" FOR RANDOM AS #1 LEN = 15
  8. FIELD #1, 15 AS Format$
  9.  
  10. LSET Format$ = ""                 'clear any old remnants
  11. PRINT #1, USING "###.##"; Value#; 'let USING do the work
  12. Fmt$ = RTRIM$(Format$)            'trim trailing blanks
  13.  
  14. PRINT "    Value:"; Value#
  15. PRINT "Formatted: "; Fmt$
  16.